Passed
Pull Request — master (#2)
by André
03:51 queued 02:09
created

input.js ➔ ... ➔ ???   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
c 0
b 0
f 0
nc 1
dl 0
loc 4
rs 10
nop 2
1
'use strict'
2
3
module.exports = (input, callback) => {
4
	const validate = require('./validate')
5
	let error = null
6
	let output
7
8
	validate(input, (validatedInput, thrownError) => {
9
		input = validatedInput
10
		error = thrownError
11
	})
12
13
	output = {
14
		'version': {'ref': 'input'},
15
		'metadata': [
16
			{'name': 'topic', 'value': 'Hulk Hogan'},
17
			{'name': 'timestamp', 'value': Date.now().toString()}
18
		]
19
	}
20
21
	callback(error, output, source)
0 ignored issues
show
Bug introduced by
The variable source seems to be never declared. If this is a global, consider adding a /** global: source */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
22
}
23